<!DOCTYPE html>
<html lang="zh">
<head>
	<title>高级搜索 - PublicCMS</title>
	<meta name="keywords" content="高级搜索"/>
	<meta name="description" content="高级搜索  ${word!}"/>
	<#include "include/header.html"/>
</head>
<body>
<#include "include/nav.html"/>
<main>
	<div class="container bread">
		<a href="${getCmsPath()}">首页</a>
	</div>
	<div class="container">
		<div class="data-list left-content">
			<div class="search">
				<form action="facetSearch.html" method="get">
					<input type="text" name="word" value="${word!}"/>
					<input type="submit" value="搜索"/>
				</form>
			</div>
<#if word?has_content>
	<@_facetSearch word=word categoryId=categoryId modelId=modelId pageIndex=page count=10>
		<#if page.totalCount gt 0>
			<#assign prePath='facetSearch.html?word='+(word!'')?url+'&categoryId='+(categoryId!'')?url+'&modelId='+(modelId!'')?url+'&'/>
			<#assign modelFacet=page.map['modelId']!/>
			<#assign categoryFacet=page.map['categoryId']!/>
			<#list page.list as a>
				<@t.meger 'modelIds' a.modelId!/>
			</#list>
			<@_model ids=t.modelIds!><#assign modelMap=map/></@_model>
			<#list page.list as a>
				<#assign model=modelMap[a.modelId?string]/>
				<#include "ftl/data-list.ftl"/>
			</#list>
			<#include "ftl/search_page.ftl"/>
		</#if>
	</@_facetSearch>
</#if>
		</div>
		<aside>
			<#if modelFacet?has_content>
				<#list modelFacet?keys as k>
					<@t.meger 'sidemodelIds' k/>
				</#list>
				<@_model ids=t.sidemodelIds>
					<#assign modelMap=map/>
				</@_model>
				<div style="border-bottom: 1px solid #eee;">
					<h3>模型</h3>
					<ul>
					<#list modelFacet?keys as k>
						<li><a href="facetSearch.html?word=${(word?url)!}&modelId=${modelMap[k].id}&categoryId=${(categoryId?url)!}">${modelMap[k].name}(${modelFacet[k]})</a></li>
					</#list>
					</ul>
				</div>
			</#if>
			<#if categoryFacet?has_content>
				<#list categoryFacet?keys as k>
					<@t.meger 'categoryIds' k/>
				</#list>
				<@_category ids=t.categoryIds>
					<#assign categoryMap=map/>
				</@_category>
				<div style="border-bottom: 1px solid #eee;">
					<h3>分类</h3>
					<ul>
					<#list categoryFacet?keys as k>
						<li><a href="facetSearch.html?word=${(word?url)!}&modelId=${(modelId?url)!}&categoryId=${categoryMap[k].id}">${categoryMap[k].name}(${categoryFacet[k]})</a></li>
					</#list>
					</ul>
				</div>
			</#if>
			<@_templateDataList path="category/list.html/1.html">
				<#include "include/"+path/><#-- 编辑推荐 -->
			</@_templateDataList>
		</aside>
	</div>
</main>
<#include "include/footer.html"/>
</body>
</html>